package com.lottery.game.core.model.dto.game;

import com.lottery.game.common.BaseObject;

import java.util.Date;

import javax.persistence.*;

import com.lottery.game.core.modules.entity.game.GameAnnouncementUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : yinlin
 * @version : 1.0
 * @date : 2019-02-12 09:09
 * @Description :
 * @Copyright : Copyright (c) 2018
 * @Company : KeRuYun Technology(Beijing) Chengdu Co. Ltd.
 * @link : com.runshang.apps.cloudgame.api.entity.GameAnnouncement
 */
@Entity
@Table(name = "game_announcement")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "系统通知")
public class GameAnnouncementTO extends BaseObject {
    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "系统通知编号",example = "789e5783722a49feb3962acea1ffcc45")
    private String id;

    @Column(name = "title")
    @ApiModelProperty(value = "系统通知标题",example = "关于充值的温馨提示")
    private String title;

    @Column(name = "content")
    @ApiModelProperty(value = "系统通知内容",example = "\\r\\n\\t亲爱的用户:为了能够保证服务质量，上分效率 请大家扫二维码后一定要添加好友再转账后，提交充值申请一定要备注好转账时候的订单号 不然无法正常上分 谢谢配合。")
    private String content;
    @OrderBy
    @Column(name = "create_date")
    @ApiModelProperty(value = "系统通知创建时间",example = "1544253110000")
    private Date createDate;

    @Column(name = "update_date")
    @ApiModelProperty(value = "系统通知更新时间",example = "1554087001000")
    private Date updateDate;

    @Column(name = "sort")
    @ApiModelProperty(value = "系统通知排序",example = "1")
    private Integer sort;

    @OneToMany
    @JoinTable(name = "game_announcement_user", joinColumns = {@JoinColumn(name = "id", referencedColumnName = "notice_id")})

//    @ApiModelProperty(value = "通知对应用户的中间表")
    private GameAnnouncementUser announcementUser;


}
